import utils  from '@utils/index'

export const listBroadcast = function(data) {
    return utils.service({
        url: '/m/product/index/broadcast',
        method: 'get',
        data: data
    })
}

export const listCategory = function(data) {
    return utils.service({
        url: '/m/product/index/category',
        method: 'get',
        data: data
    })
}

export const listProduct = function(data) {
    return utils.service({
        url: '/m/product/index/product',
        method: 'get',
        data: data
    })
}
/*
{ 
    "currentPage": 0, 
    "pageSize": 10, 
    "categoryId": 1,
    "name": "名称" 
}
 */

export const listCategoryProduct = function(data) {
    return utils.service({
        url: '/m/product/list',
        method: 'post',
        data: data
    })
}

export const getProductDetail = function(data) {
    return utils.service({
        url: '/m/product/'+data.id,
        method: 'get'
    })
}

